home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
8bitfiles.net/archives
/
archives.tar
/
archives
/
compuserve-file-archive
/
05 Programming
/
SEQREL.BIN
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2019-04-13
|
1KB
|
37 lines
1 REM (C) 1984 JOEL M. RUBIN
2 REM CONVERTS RELATIVE INTERCHANGE FILE TO
3 REM RELATIVE FILE
4 REM AN RIF IS USR FILE WHICH MAY BE TRANSMITTED
5 REM IN A SEQUENTIAL MANNER
6 REM COMMODORE '64 PROGRAM FOR 1541 DRIVE
9 REM SET UP Y$ TO POINT TO $C000
10 Y$="":T=PEEK(45)+256*PEEK(46):POKET+3,0:POKET+4,192
19 REM MACHINE LANGUAGE TO READ A RECORD
20 FORI=828TO851:READA:POKEI,A:NEXT
30 DATA238,32,208
40 DATA162,2,32,198,255,162,0,32,228,255,157,0,192,232,224,0,208,245,76,204,255
50 GOTO400
99 REM READ ERROR CHANNEL
100 INPUT#15,A,B$,C,D:IFA=50THENRETURN
110 IFATHENPRINTA;B$C;D:PRINT#15,"UI+":POKE53265,27:STOP
120 RETURN
199 READ A RECORD
200 SYS828:SS=ST
210 RE=RE+1:IFRE=256THENRF=RF+1:RE=0
220 PRINT#15,"P"CHR$(RE)CHR$(RF)"":GOSUB100:PRINT#3,Y$;:GOSUB100
230 RETURN
299 REM SET UP FILES
300 INPUT"FILE NAME";FI$
310 OPEN2,8,2,FI$+",S,R":GOSUB100:GET#2,A$,L$,H$:CLOSE2:RL=ASC(A$+N$)
320 IFL$=""THENL$=N$
330 IFH$=""THENH$=N$
340 INPUT"OUTPUT FILE";OF$
350 OPEN2,8,2,OF$+",L,"+CHR$(RL):GOSUB100:POKE846,RL:POKET+2,RL
360 PRINT#15,"P"L$H$"":PRINT#2," ";:CLOSE2:OPEN3,8,2,OF$:GOSUB100
370 OPEN2,8,3,FI$:GOSUB100:GET#2,A$,B$,C$:RETURN
399 REM MAIN PROGRAM CONTINUES
400 N$=CHR$(0):OPEN15,8,15,"I":GOSUB100:GOSUB300
410 POKE53265,11:PRINT#15,"UI-"
420 GOSUB200:IFSS=0GOTO420
430 CLOSE2:CLOSE3:GOSUB100:PRINT#15,"UI+":POKE53265,27